import request from '../../../utils/request'

export function playerPaginationListApi(page_size, current_page) {
  /**
   * 指定分页信息查询玩家信息列表接口
  */
  return request({
    url: '/api/users/player/?page_size=' + page_size + '&current_page=' + current_page,
    method: 'GET',
  })
}

export function playerSearchPaginationListApi(page_size, current_page, search_data) {
  /**
   * 指定查询内容获取玩家信息接口——包含分页信息
  */
  return request({
    url: '/api/users/player/?page_size=' + page_size + '&current_page=' + current_page + '&search_data=' + search_data,
    method: 'GET',
  })
}

export function playerSearchApi(search_data) {
  /**
   * 指定查询内容获取玩家信息接口
  */
  return request({
    url: '/api/users/player/?search_data=' + search_data,
    method: 'GET',
  })
}

export function playerListApi() {
  /**
   * 玩家信息列表接口
  */
  return request({
    url: '/api/users/player/',
    method: 'GET',
  })
}

export function playerCreateApi(data) {
  /**
   * 玩家信息创建接口
  */
  return request({
    url: '/api/users/player/',
    method: 'POST',
    data: data,
  })
}


export function playerDeleteApi (data) {
  /**
   * 玩家信息删除接口
  */
  return request({
    url: '/api/users/player/' + data['id'] + '/',
    method: 'DELETE',
  })
}

export function playerUpdateApi (data) {
  /**
   * 玩家信息更新接口
  */
  return request({
    url: '/api/users/player/' + data['id'] + '/',
    method: 'PATCH',
    data: data
  })
}

export function playerDetailApi (data) {
  /**
   * 单个玩家信息接口
  */
  return request({
    url: '/api/users/player/' + data['id'] + '/',
    method: 'GET',
  })
}
